home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Hyper / M-Md / MacApp™ Info.sit / MacApp™ info / MacApp™ info / card_26259.txt < prev    next >
Encoding:
Text File  |  1988-01-30  |  1.3 KB  |  51 lines

  1. -- card: 26259 from stack: in
  2. -- bmap block id: 26975
  3. -- flags: 0000
  4. -- background id: 4180
  5. -- name: Menu Commands
  6. ----- HyperTalk script -----
  7. on arrowKey direction
  8.   if direction = "left" then
  9.     visual scroll right
  10.     go to prev card
  11.   else if direction = "right" then
  12.     visual scroll left
  13.     go to next card
  14.   else if direction = "up" then
  15.     visual dissolve
  16.     go to card "Chart"
  17.   end if
  18. end arrowKey
  19.  
  20.  
  21.  
  22. -- part 5 (button)
  23. -- low flags: 00
  24. -- high flags: 0001
  25. -- rect: left=228 top=302 right=328 bottom=269
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 2162 / 2162
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: return
  34. ----- HyperTalk script -----
  35. on mouseUp
  36.   visual dissolve
  37.   go to card "Chart"
  38. end mouseUp
  39.  
  40.  
  41.  
  42. -- part contents for background part 5
  43. ----- text -----
  44. Menu Commands
  45.  
  46. -- part contents for background part 6
  47. ----- text -----
  48.  
  49. MacApp will allow you to create custom pulldown menus.  You must specify the names of the menu items and the commands they operate.
  50. MacApp will automatically handle mouse clicks in the menu area, and then call the correct command methods if the user selects one of your items.  You must write the code for these commands yourself,
  51. but MacApp will do all the bookkeeping work, including calling the Undo and Redo methods.